CC = gcc
LD = gcc
AS = gcc
RM = rm

CFLAGS =
SFLAGS = -S -mrnames
LDADD=-lm
SOURCES=tp0.c list.c
OBJS=tp0.o list.o
CLEANBINS=tp0 tp0-debug
CLEANOBJS=$(OBJS)


all: tp0

asm:
	$(AS) $(SFLAGS) tp0.c -o tp0.s
	$(AS) $(SFLAGS) list.c -o list.s

.c.o:
	$(CC) $(CFLAGS) -c $< -o $@

tp0: $(OBJS)
	$(LD) $(LDADD) $(OBJS) -o tp0
	
debug: $(OBJS)
	$(LD) $(LDADD) $(OBJS) -ggdb -o tp0-debug

clean:
	@-$(RM) $(CLEANBINS) $(CLEANOBJS)
	